package com.ziyun.erp.modules.quoteFactoryMaterial.dao;

import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.ziyun.erp.modules.quoteFactoryMaterial.entity.QuoteFactoryMaterialEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.ziyun.erp.modules.quoteFactoryMaterial.entity.QuoteFactoryMaterialVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 工厂材料价格表
 * 
 * @author jl
 * @email 
 * @date 2018-09-12 09:04:01
 */
public interface QuoteFactoryMaterialDao extends BaseMapper<QuoteFactoryMaterialEntity> {

    List<QuoteFactoryMaterialVO> queryPage(@Param("page")Pagination page, @Param("map")Map<String, Object> map);

    List<QuoteFactoryMaterialEntity> findWeightList(@Param("factoryId") Integer factoryId, @Param("optionName")String optionName,@Param("materialType") String materialType);

    int getCount(@Param("factoryId")Integer factoryId,@Param("optionKey") String optionKey,@Param("materialType") String materialType,@Param("optionName")String optionName);

    int deleteByIds(Integer[] ids);

    //根据选项名称和克重查找对应的option_id
    Integer getOptionId (@Param("optionName")String optionName,@Param("optionName2")String optionName2);

    List<QuoteFactoryMaterialVO> getLeftTableData( Integer factoryId);

    int delWeight(@Param("optionName")String optionName,@Param("factoryId")Integer factoryId);

    int specialPaper(@Param("ids") Integer[] ids);

    int unSpecialPaper(@Param("ids") Integer[] ids);
}
